<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red{
            color:red;
            font-size: 100px;
        }
        .blue{
            color:blue;
            font-size: 10px;
        }
    </style>
</head>
<body>
    <div id="app">
            <!-- class  对象写法 -->
            <!-- 不要忘记加 冒号，本质上是 v-bind简写 -->
                <h1 :class="{red:acitve}">class 对象的写法</h1>
                <!-- class 数组的写法 -->
                <h1 :class="[{blue:flag}]">class 对象的写法</h1>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                acitve:true,
                flag:true
            }
        })
    </script>
</body>
</html>